import request from '@/utils/request'
import {projectApiUrl} from '../config'

/**
 * 节点维护新增
 * @param data
 */
export function nodeMaintain(data){
  return request({
    url: projectApiUrl+'/construction/planComplete',
    method: 'post',
    data: data
  })
}

/**
 * 总计划实施统计查询
 * @param id
 */
export function getPlanTotalDetails(id){
  return request({
    url: projectApiUrl+'/construction/master-planTotal/' +id,
    method: 'get',
    id
  })
}

/**
 * 施工总进度日历表
 * @param id
 */
export function getPlanCalendarDetails(data){
  return request({
    url: projectApiUrl+'/construction/master-plan-calendar',
    method: 'get',
    params:data
  })
}


/**
 * 施工总进度详情
 * @param id
 */
export function getMasterPlanDetails(id){
  return request({
    url: projectApiUrl+'/construction/master-plan/detail/'+id,
    method: 'get',
    id
  })
}

/**
 * 节点详情
 * @param id
 */
export function getNodeDetails(id){
  return request({
    url: projectApiUrl+'/construction/details/'+id,
    method: 'get',
    id
  })
}

/**
 * 统计日历详情
 * @param id
 */
export function getNodeAndCalenderDetails(data){
  return request({
    url: projectApiUrl+'/construction/master-plan-planTotal-calendar',
    method: 'get',
    params:data
  })
}
